home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat6 / buttonfly.z / buttonfly
Encoding:
Text File  |  2000-10-16  |  16.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4. BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))                                                    BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      buttonfly - a pretty user interface for Silicon Graphics demos
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      bbbbuuuuttttttttoooonnnnffffllllyyyy [ mmmmeeeennnnuuuuffffiiiilllleeee ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _B_u_t_t_o_n_f_l_y is a user reconfigurable, hierarchical, graphical menu system.
  16.  
  17.      _B_u_t_t_o_n_f_l_y opens up a window and displays one or more buttons, each with
  18.      its own title.  Moving the mouse pointer over a button and pressing the
  19.      left mouse button selects that button, and will cause it to either exe-
  20.      cute UNIX commands (such as running a program) or fly forward and flip
  21.      over, exposing one or more new buttons.  Each of the newly exposed but-
  22.      tons may also be selected to either execute UNIX commands or expose a new
  23.      level of buttons, and so on.
  24.  
  25.      To go back to the previous set of buttons move the mouse pointer so it
  26.      isn't over any of the buttons, and press the left mouse button (i.e.
  27.      select the background). The buttons will flip over backwards to bring up
  28.      the previous set.  Selecting the background at the top level does noth-
  29.      ing.
  30.  
  31.      Using the middle mouse button instead of the left mouse button causes the
  32.      new menu to be displayed immediately, instead of flipping it in to view.
  33.  
  34.      Pressing the right mouse button will bring up a different pop-up menu
  35.      depending on which button the mouse pointer is over. Each menu has at
  36.      least a 'Do It' entry; selecting this entry has the same effect that
  37.      pressing the left mouse button while it is over the background would.
  38.  
  39.      Pressing the space bar will toggle between a full-screen version of _b_u_t_-
  40.      _t_o_n_f_l_y and the window version.  The full-screen version is useful for
  41.      presentations to large audiences, where visibility is important.
  42.  
  43.      To exit from _b_u_t_t_o_n_f_l_y, press the escape key.
  44.  
  45. RRRREEEECCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY
  46.      _B_u_t_t_o_n_f_l_y'_s menus were designed to be simple to change with any UNIX text
  47.      editor (such as _v_i ).  When it is run with no arguments, it looks for
  48.      button descriptions in a file called '.menu' in the current directory.
  49.      If it is given one argument, it will look in that file for button defini-
  50.      tions instead.
  51.  
  52.      _B_u_t_t_o_n_f_l_y uses a very simple format to describe its buttons.  The format
  53.      has four different kinds of lines: comments, titles, actions, and com-
  54.      mands.
  55.  
  56.      Any line beginning with a '#' character is considered a comment and is
  57.      ignored.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))                                                    BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))
  71.  
  72.  
  73.  
  74.      Button titles, like comments, always start in the first column of the
  75.      file, and may be anything not starting with a '#'.  Titles may be a max-
  76.      imum of 36 characters long; _b_u_t_t_o_n_f_l_y will automatically separate the ti-
  77.      tle into a maximum of three lines of twelve characters, separating words
  78.      in the title at spaces.
  79.  
  80.      Action lines start with a tab and end with a newline, and may be any UNIX
  81.      command.  Multiple actions may be specified for a button by listing them
  82.      after the button one per line, each starting with a tab.  Actions may not
  83.      span more than one line, but may be any length.  If no actions are speci-
  84.      fied for a button, the button is displayed, but nothing will happen when
  85.      it is selected.
  86.  
  87.      Commands, like actions, start with a tab character.  Currently, the com-
  88.      mands recognized are '.menu.', '.popup.', '.cd.', '.color.',
  89.      '.backcolor.', and '.highcolor.'.  Everything else is assumed to be an
  90.      action and will be executed as a UNIX command in a shell (see _s_h(_1)).
  91.  
  92.      The special action called '.menu.' is used to specify a button that has
  93.      several buttons attached to the back of it.  When _b_u_t_t_o_n_f_l_y sees '.menu.
  94.      filename' it will create a new set of buttons from the descriptions in
  95.      'filename'.  If it cannot find 'filename' in the current directory, then
  96.      nothing happens.  If 'filename' is '-', then the new set of buttons is
  97.      created from the standard output of the previous actions (see example
  98.      below).  Note that any 'cd' commands in an action list do not affect the
  99.      directory in which _b_u_t_t_o_n_f_l_y looks for the filenames specified in
  100.      '.menu.' commands, becuase actions are executed in a sub-shell (see the
  101.      '.cd.' command below).
  102.  
  103.      Another special actions is '.popup.'.  It is used to define a pop-up menu
  104.      entry attached to a button.  When _b_u_t_t_o_n_f_l_y sees '.popop. title' it adds
  105.      an entry 'title' to the button's pop-up menu.  The actions following a
  106.      .popup. command will be executed when that menu entry is chosen.  _B_u_t_-
  107.      _t_o_n_f_l_y automatically provides a 'Do It' entry, which has the same effect
  108.      as pressing the left mouse button.
  109.  
  110.      The '.cd.' action is used to change buttonfly's idea of the current work-
  111.      ing directory.  When the button containing the .cd. command is pressed,
  112.      _b_u_t_t_o_n_f_l_y will chdir into that directory before executing that button's
  113.      actions, and all buttons underneath that button will also be executed in
  114.      that directory (unless they also have .cd. commands).  Note that execut-
  115.      ing the regular 'cd' shell command in a button does not affect
  116.      _b_u_t_t_o_n_f_l_y'_s idea of the current working directory, since all button ac-
  117.      tions are executed in their own shell environment.
  118.  
  119.      The command '.color.' followed by three numbers in the range 0.0 ...  1.0
  120.      specifies the red, green and blue components of a button's color, and
  121.      '.highcolor' does the same for the color of the button as it is being
  122.      selected.  '.backcolor.' changes the color of the back of the button,
  123.      which becomes the background color of the next set of buttons (displayed
  124.      when the button flips over).  Note that using color commands at the top
  125.      of a file, before any buttons have been defined, causes the default
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))                                                    BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))
  137.  
  138.  
  139.  
  140.      colors to be changed for all subsequent buttons.  To change the back-
  141.      ground color to red for the first button and all subsequent buttons you
  142.      would specify:
  143.  
  144.           ._b_a_c_k_c_o_l_o_r. _1._0 _0._0 _0._0
  145.  
  146.      in the menu description file before any buttons are defined.
  147.  
  148. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  149.      The following are example buttonfly .menu files, with descriptions of
  150.      what they do.
  151.  
  152.      This is a very simple button called 'First' that has the buttons defined
  153.      in the file '.menu_second' on the back of it.
  154.  
  155.           First
  156.                .menu. .menu_second
  157.  
  158.      Here are three buttons.  The 'Parent' button is purple and will flip over
  159.      and display the other two buttons when pressed (they will be displayed on
  160.      a purple background, since that is the color on the back of the first
  161.      button).  The 'Demonstrate...' button changes directories and then runs a
  162.      program when pressed, and 'Recurse' flips over and shows the first button
  163.      again, this time on a blue background since the '.backcolor.' command
  164.      changes the background color to blue.
  165.  
  166.           #Save this in a file called '.menu'
  167.           Parent
  168.                .color. .89 .10 .89
  169.                .backcolor. .89 .10 .89
  170.                .highcolor. 1.0 .5 1.0
  171.                .menu. child
  172.  
  173.           #Save the following buttons in a file called 'child'
  174.           Demonstrate GL/NeWS Interface
  175.                cd /usr/NeWS/demo
  176.                glnews
  177.           Recurse
  178.                .backcolor. 0.0 0.0 1.0
  179.                .menu. .menu
  180.  
  181.      Here is a very complicated button, which builds a button file based on
  182.      the files it finds in a directory full of files.  When pressed, it builds
  183.      the file and then uses .menu.  to flip over, exposing entries for all the
  184.      files it found.  Note that this allows you to delete or add image files,
  185.      and the buttons will always be accurate.  It also has a pop-up menu on it
  186.      giving help; the first .popup command specifies the title of the menu us-
  187.      ing the %t feature of Silicon Graphics menus.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))                                                    BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))
  203.  
  204.  
  205.  
  206.           Show An Image
  207.                cd /usr/demos/data/images
  208.           #
  209.           # The following two lines must all be on the
  210.           # same line in the .menu file
  211.           #
  212.                /bin/ls *.rgb | awk 'BEGIN{FS="."}{print "Show " $1
  213.           "\n\tipaste /usr/demos/data/images/" $0 "\n"}'
  214.                .menu. -
  215.                .popup. ShowImage Menu %t
  216.                .popup. Ipaste Man Page
  217.                wsh -c man ipaste
  218.  
  219.  
  220. BBBBUUUUGGGGSSSS
  221.      _B_u_t_t_o_n_f_l_y will not work if the first character of a file is a TAB fol-
  222.      lowed by anything other than .color., .backcolor., or .highcolor.  It is
  223.      safest to eliminate any blank lines from the files you create.
  224.  
  225.      _B_u_t_t_o_n_f_l_y may crash if given an arbitrary file as input.
  226.  
  227.      The maximum number of buttons on any level of the hierarchy is 32.
  228.  
  229.      If a program fails to run, nothing happens-- no error messages or warn-
  230.      ings are given.  This can be considered either a feature or a bug.
  231.  
  232.      Specifying %F, %f, %x, or %m as part of a .popup. title will give bad
  233.      results, and may crash the program.  Using %t to specify a title works,
  234.      but any actions specified for that entry will never be executed (since it
  235.      is impossible to select a title entry).
  236.  
  237.  
  238. AAAADDDDDDDDEEEENNNNDDDDAAAA
  239.      AAAAUUUUDDDDIIIIOOOO With the release of IRIX 6.3, audio was added to buttonfly.  When
  240.      the buttons fly forward or back, the system will play corresponding audio
  241.      files located in ////uuuussssrrrr////ddddeeeemmmmoooossss////DDDDeeeemmmmoooo____IIIInnnntttteeeerrrrffffaaaacccceeeessss////BBBBuuuuttttttttoooonnnnffffllllyyyy....
  242.  
  243.      If the middle mouse option is used to move through the buttons without
  244.      flight, the audio will not play.  The audio option can be toggled off by
  245.      running bbbbuuuuttttttttoooonnnnffffllllyyyy ----aaaa
  246.  
  247. IIIINNNNTTTTEEEEGGGGRRRRAAAATTTTIIIIOOOONNNN WWWWIIIITTTTHHHH WWWWEEEEBBBB----BBBBAAAASSSSEEEEDDDD IIIINNNNTTTTEEEERRRRFFFFAAAACCCCEEEE
  248.      With the release of IRIX 6.3, we have added a web-based interface to the
  249.      demos.  Since this interface already sorts demos based on categories, we
  250.      were able to use a perl script ( mmmmkkkkmmmmeeeennnnuuuu ) to access the sorted lists of
  251.      demos and create buttonfly heirarchies dynamically.  When bbbbuuuuttttttttoooonnnnffffllllyyyy is
  252.      started now, by default, it will have the categories from the web UI:
  253.      FFFFeeeeaaaattttuuuurrrreeeessss,,,, IIIInnnndddduuuussssttttrrrriiiieeeessss,,,, and HHHHaaaarrrrddddwwwwaaaarrrreeee....
  254.        The sub-categories which fall beneath these are viewable from the
  255.      Search page of the web-based interface.  This is accessible from the sys-
  256.      tem toolchest FFFFiiiinnnnddddDemos menu option, or by typing hhhhttttttttpppp::::////////llllooooccccaaaallllhhhhoooosssstttt////DDDDeeeemmmmoooossss
  257.      from your local web browser.
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))                                                    BBBBUUUUTTTTTTTTOOOONNNNFFFFLLLLYYYY((((6666DDDD))))
  269.  
  270.  
  271.  
  272.      Although these demos do not require the traditional structure, this
  273.      structure is still supported, particularly since these changes were made
  274.      via scripts, not in the buttonfly source code.
  275.  
  276.      To use buttonfly for accessing demos from the web-based interface (locat-
  277.      ed in ////uuuussssrrrr////ddddeeeemmmmoooossss////GGGGeeeennnneeeerrrraaaallll____DDDDeeeemmmmoooossss ) and demos with the traditional heirar-
  278.      chy, just install or link the traditional heirarchy into
  279.      ////uuuussssrrrr////ddddeeeemmmmoooossss////BBBBuuuuttttttttoooonnnnffffllllyyyy....  The mmmmkkkkmmmmeeeennnnuuuu script automatically adds a button
  280.      based on the menu file located in the new directory beneath
  281.      ////uuuussssrrrr////ddddeeeemmmmoooossss////BBBBuuuuttttttttoooonnnnffffllllyyyy....
  282.  
  283.  
  284. AAAAUUUUTTTTHHHHOOOORRRR
  285.      Thant Tessman and Gavin Bell Audio support: Diana Starr Perl scripts: Da-
  286.      vid (Sprout) Anderson
  287.  
  288.  
  289. FFFFIIIILLLLEEEESSSS
  290.      ////uuuussssrrrr////ddddeeeemmmmoooossss////DDDDeeeemmmmoooo____IIIInnnntttteeeerrrrffffaaaacccceeeessss////BBBBuuuuttttttttoooonnnnffffllllyyyy////
  291.           .menu               - custom menu file which supports
  292.                            the display of demos from the web-based
  293.                            interface and any demos in
  294.           Times-Italic.bw     - font file
  295.           buttonfly      - executable
  296.           buttonfly.sh        - script to process input for buttonfly
  297.           buttonflyAudio - script to process input for buttonfly, includes audio
  298.           demofind       - script that finds demos
  299.           in.aiff             - audio for buttons flying in
  300.           manwsh         - script: launches shell with man page
  301.           mkmenu         - script: dynamically creates
  302.                            buttonfly menu files for demos
  303.                            installed in web interface
  304.           out.aiff       - audio for buttons flying out
  305.           sea.rgb        - texture
  306.           redirect       - script: redirects output of demo
  307.  
  308.      ////uuuussssrrrr////ddddeeeemmmmoooossss////BBBBuuuuttttttttoooonnnnffffllllyyyy
  309.           buttonfly           - for convenience, this is a link to the above buttonfly.sh script
  310.           buttonflyAudio - for conveniece, this is a link to the above buttonflyAudio script
  311.           Additional Demo Trees    - Traditionally structured buttonfly heirarchies
  312.                               can be installed in this directory
  313.  
  314.  
  315. HHHHAAAARRRRDDDDWWWWAAAARRRREEEE RRRREEEEQQQQUUUUIIIIRRRREEEEMMMMEEEENNNNTTTTSSSS
  316.      Must have at least 24 bitplanes.
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.